There should be no circumstances where an implicit grab is requested but
no focus exists, there's however circumstances (like windowing grabs taking
input to a different window) where we might get implicit grabs being undone
when then new window didn't create a focus for the pointer itself.
GtkPointerFocus *focus;
focus = gtk_window_lookup_pointer_focus (window, device, sequence);
+ if (!focus && !grab_widget)
+ return;
g_assert (focus != NULL);
gtk_pointer_focus_set_implicit_grab (focus, grab_widget);
}